package com.hjm.project.InvoiceRecord.InvoiceRecord.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.InvoiceRecord.InvoiceRecord.mapper.InvoiceRecordMapper;
import com.hjm.project.InvoiceRecord.InvoiceRecord.domain.InvoiceRecord;
import com.hjm.project.InvoiceRecord.InvoiceRecord.service.IInvoiceRecordService;
import com.hjm.common.utils.text.Convert;

/**
 * 服务商提供发票记录Service业务层处理
 * 
 * @author InvoiceRecord
 * @date 2020-11-25
 */
@Service
public class InvoiceRecordServiceImpl implements IInvoiceRecordService 
{
    @Autowired
    private InvoiceRecordMapper invoiceRecordMapper;

    /**
     * 查询服务商提供发票记录
     * 
     * @param id 服务商提供发票记录ID
     * @return 服务商提供发票记录
     */
    @Override
    public InvoiceRecord selectInvoiceRecordById(Long id)
    {
        return invoiceRecordMapper.selectInvoiceRecordById(id);
    }

    /**
     * 查询服务商提供发票记录列表
     * 
     * @param invoiceRecord 服务商提供发票记录
     * @return 服务商提供发票记录
     */
    @Override
    public List<InvoiceRecord> selectInvoiceRecordList(InvoiceRecord invoiceRecord)
    {
        return invoiceRecordMapper.selectInvoiceRecordList(invoiceRecord);
    }

    /**
     * 新增服务商提供发票记录
     * 
     * @param invoiceRecord 服务商提供发票记录
     * @return 结果
     */
    @Override
    public int insertInvoiceRecord(InvoiceRecord invoiceRecord)
    {
        return invoiceRecordMapper.insertInvoiceRecord(invoiceRecord);
    }

    /**
     * 修改服务商提供发票记录
     * 
     * @param invoiceRecord 服务商提供发票记录
     * @return 结果
     */
    @Override
    public int updateInvoiceRecord(InvoiceRecord invoiceRecord)
    {
        return invoiceRecordMapper.updateInvoiceRecord(invoiceRecord);
    }

    /**
     * 删除服务商提供发票记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteInvoiceRecordByIds(String ids)
    {
        return invoiceRecordMapper.deleteInvoiceRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除服务商提供发票记录信息
     * 
     * @param id 服务商提供发票记录ID
     * @return 结果
     */
    @Override
    public int deleteInvoiceRecordById(Long id)
    {
        return invoiceRecordMapper.deleteInvoiceRecordById(id);
    }
}
